﻿using System.Collections.Generic;
using System.ServiceModel;

namespace RockBus.DataContracts
{
    [MessageContract(WrapperNamespace = StringConstants.RockBusNamespace)]
    public class AddOrUpdatePublishersResponse
    {
        public AddOrUpdatePublishersResponse()
        {
            this.Endpoints = new List<EndpointInfo>();
        }

        public AddOrUpdatePublishersResponse(params EndpointInfo[] endpoints)
            : this((IEnumerable<EndpointInfo>)endpoints)
        {
        }

        public AddOrUpdatePublishersResponse(IEnumerable<EndpointInfo> endpoints)
            : this()
        {
            ((List<EndpointInfo>)this.Endpoints).AddRange(endpoints);
        }

        [MessageBodyMember]
        public ICollection<EndpointInfo> Endpoints { get; private set; }
    }
}